package com.witdata.common.domain;

import lombok.Getter;
import lombok.ToString;

/**
 * DATETIME: 2023/12/1 20:40
 * USER: admin
 **/
@Getter
@ToString
public enum Status {
    USERINFOSEARCHSUCCESS(200, "用户信息查找成功"),
    LOGINSUCCESS(200, "登录成功！"),
    REGISTERSUCCESS(2000, "注册成功！"),
    LOGOUTSUCCESS(200, "注销成功！"),
    UPLOADSUCCESS(2000,"上传成功！"),
    SELECTSUCCESS(200, "查询成功！"),
    ARTICLEEDITSUCCESS(200, "文章修改成功！"),
    SUCCESS(200, "获取成功！"),
    LIKESUCCESS(200, "点赞成功！"),
    CANCELSUCCESS(200, "取消成功！"),
    CREATESUCCESS(2000, "创建成功！"),
    CREATEERROR(500, "创建失败！"),
    ISEXISTS(500, "已存在，无法创建！"),
    STARTSUCCESS(200, "启动成功！"),
    EDITSUCCESS(2000, "修改成功！"),
    READSUCCESS(200, "阅读成功！"),
    LogSaveSuccess(2000, "日志保存成功！"),
    GetVisitTimestampSuccess(2000, "获取访问次数成功！"),
    SENDCOMMANDSUCCESS(2000, "发送成功！"),
    UPDATESUCCESS(200, "修改成功！"),
    UPDATEERROR(200, "修改失败！"),
    SAVESUCCESS(200, "保存成功"),
    REMOVESUCCESS(200, "删除成功！"),
    REMOVEERROR(500, "删除失败！"),
    DELETESUCCESS(200, "删除成功"),
    DELETEERROR(3000, "删除失败"),
    USERNOTFOUND(420, "用户不存在"),
    TOKENEXCEPTION(421, "未获取到有效Token，请检查Token"),
    USERALREADYFOUND(422, "用户已存在"),
    PARAMERROR(423, "你输入的参数错误"),
    PASSWORDERROR(424, "你输入的密码错误"),
    LOGOUTERROR(425, "注销失败"),
    UPLOADERROR(426, "上传失败"),
    AUTHNOTFOUND(427, "你还未登录！"),
    TOKENFAILURE(4500, "Token已失效，请重新登录"),
    LOGINERROR(430, "登录异常！"),
    AUTHERROR(430, "认证失败！"),
    USERREGISTERERROR(4305, "用户注册失败！"),
    USERNAMEPASSWORDNOTFOUND(4301, "用户名和密码不能为空！"),
    LONGUSERNOTFOUND(431, "对不起，您的用户不存在"),
    LOGINUSERISDELETED(431, "对不起，您的账号已被删除"),
    LOGINUSERISDEACTIVATED(432, "对不起，您的账号已被禁用"),
    CAPTCHAERROR(433, "验证码错误！"),
    CAPTCHAOVERDUE(434, "验证码已过期！"),
    USERPERMDEFICIENCY(440, "您没有权限访问该资源"),
    TOKENBUILDERROR(520, "Token生成错误！"),
    TOKENREMOVEERROR(521, "Token移除失败！"),
    USERINFOUPDATEERROR(531, "用户信息修改失败"),
    USERPASSWORDUPDATEERROR(532, "用户密码修改失败"),
    ARTICLEISEMPTY(4000, "文章为空"),
    ARTICLEEDITERROR(4001, "文章修改失败"),
    ARTICLENOTFOUND(4002, "文章不存在"),
    LIKEERROR(4010, "你已经点赞该文章，无需重复点赞！"),
    UNLIKEERROR(4011, "你已经取消点赞该文章，无需重复取消点赞！"),
    ARTICLEREVIEWNOTFOUND(4020, "文章评论为空！"),
    ARTICLEREVIEPUBLISHERROR(4021, "文章评论发布失败！"),
    ARTICLEREVIEPUBLISHSUCCESS(4022, "文章评论发布成功！"),
    SUBJECTNOTFOUND(5000, "你没有权限访问该题单"),
    SAVEERROR(500, "保存错误"),
    SELECTERROR(555, "查询错误"),
    APIERROR(600, "API请求错误"),
    USERFOLLOWESUCCESS(6011, "关注成功！"),
    USERFOLLOWERROR(6009, "关注失败！"),
    USERFOLLOWISEXIST(6010, "您已经关注该用户，不能再次关注！"),
    USERFOLLOWEMYRROR(6011, "您不能关注自己！"),
    CREATESESSIONERROR(6030, "创建会话失败！"),
    SESSIONISEXISTS(6031, "会话存在，无法创建！"),
    SESSIONNOTFOUND(6032, "会话不存在！"),
    CREATESESSIONSUCCESS(200, "创建会话成功！"),
    SENDMESSAGESUCCESS(200, "发送消息成功！"),
    SENDMESSAGEERROR(6032, "发送消息失败！"),
    GETERROR(550, "获取失败！"),
    UNAUTHORIZED(551, "未授权！"),
    COURSENOTFOUND(7010, "课程为空"),
    COURSE_SUBJECTS_NOT_FOUND(7011, "课程题单为空"),
    CREATE_COURSE_FAILED(7012, "创建课程失败"),
    UPDATE_COURSE_FAILED(7013, "更新课程失败"),
    DELETE_COURSE_FAILED(7014, "删除课程失败"),
    ADD_TEACHER_FAILED(7015, "添加教师失败"),
    ADD_ASSISTANT_FAILED(7016, "添加助教失败"),
    ADD_STUDENT_FAILED(7017, "添加学生失败"),
    REMOVE_TEACHER_FAILED(7018, "移除教师失败"),
    REMOVE_ASSISTANT_FAILED(7019, "移除助教失败"),
    REMOVE_STUDENT_FAILED(7020, "移除学生失败"),
    PERMALREADYEXISTS(5101, "该权限已存在！"),
    PERMSAVESUCCESS(5100, "权限添加成功！"),
    ROLESAVEERROR(5201, "角色添加错误！"),
    ROLESAVESUCCESS(5200, "角色添加成功！"),
    ROLEPERMSAVESUCCESS(5200, "角色权限添加成功！"),
    ROLEPERMALREADYEXISTS(5201,"该角色已有该权限"),
    ROLEALREADYEXISTS(5200, "角色已经存在！"),
    USERROLESAVESUCCESS(5200, "用户角色添加成功！"),
    USERROLEALREADYEXISTS(5201, "该用户已有该角色"),
    USERIDNOTFOUND(5001, "用户ID不能为空"),
    CREATECONTAINERERROR(6070, "创建容器失败！"),
    SAVECONTAINERERROR(6071, "保存容器失败！"),
    DOCKERCONTAINERIDERROR(6072, "Docker容器ID不正确！"),
    INSTANCEOFFLINE(6073, "实例已离线！"),
    INSTANCEISNOTEXISTS(6074, "实例不存在！"),
    STARTCONTAINER(6080, "启动容器失败！"),
    STARTDOCKERSUCCESS(2000, "启动容器成功！"),
    STOPDOCKERSUCCESS(2000, "停止容器成功！"),
    INSTANCEEDITSUCCESS(200, "实例修改成功！"),
    ENVIRONMENTNOTEXISTS(6090, "环境不存在！"),
    SERVERERROR(500, "服务器异常"),
    READERROR(500, "阅读失败！"),
    CHECKVERSIONSUCCESS(2000, "你已经是最新版！"),
    GetUserIdError(500, "获取用户ID失败"),
    JoinSuccess(200, "加入成功！"),
    JoinError(7011, "加入失败！"),
    NotJoin(7012, "你还未加入！"),
    AlreadyJoined(7022, "您已加入，无需重复加入！"),
    LeaveSuccess(200, "离开成功！"),
    LeaveError(7013, "离开失败！"),
    DissolveError(7014, "解散失败！"),
    PublishSuccess(200, "发布成功！"),
    AddSuccess(200, "新增成功！");


    private final Integer code;
    private final String msg;
    Status(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

}
